<?php
$link = $this->link;
$url = $this->url;
$modelR = new RemoveCircumflex();
if(isset($link['id'])){
$obj = $this->object;
?>

<!-- TRANG TIN TUC CHI TIET -->
 <!--quang cao-->

 <!--<div id="sunnet_widget_44" style="display: block;padding:5px;clear:both;">
    
    <script type="text/javascript">var is_load_sunnet_lib = is_load_sunnet_lib || 1;if(is_load_sunnet_lib == 1) {is_load_sunnet_lib = 2;if(typeof(jQuery)=='undefined') {document.write(unescape("%3Cscript src='http://amobi.vn/js/default/jquery-1.7.2.min.js' type='text/javascript'%3E%3C/script%3E"));}document.write(unescape("%3Cscript src='http://amobi.vn/js/default/sunnet.js' type='text/javascript'%3E%3C/script%3E"));}</script>
    <script type="text/javascript" src="http://amobi.vn/index/widget?widget_id=44"></script>    </center>    
        
</div>
-->
<div id="news" style="clear:both;">
    <div class="news">
        <h2><?php echo $obj['title']?></h2>
        <span>Cập nhật: <?php echo $obj['date'] ?> &nbsp;&nbsp;&nbsp;Lượt xem: <?php echo $obj['hits']?></span>
        <div>
            <br /><b><?php echo $obj['description'];?></b>
            <?php echo $obj['content']?>
            <?php if($obj['source'] != null && $obj['source'] != "") echo "<p style='text-align: right; font-weight:bold; font-style: italic'>Theo: ".$obj['source']."</p>"?>
        </div>
    </div>
    
    <div id="related_news" class="news">
        <h2 class="label_top">Tin tức liên quan:</h2>
        <ul>
            <?php foreach($this->list_related as $item):?>
            <li><a href="/app/tin-tuc/<?php echo $item['id'];?>-<?php echo $modelR->rewrite($item['title'])?>.html"><?php echo $item['title']?></a></li>
            <?php endforeach;?>
        </ul>
    </div>
    <div class="content-block box-comment">
        <h2 class="label_top">Bình luận</h2>
        <!--
        <div id="_commentNotiBox">
            <p class="notification attention">Chỉ chấp nhận bình luận bằng tiếng Việt có dấu, những bình luận sai quy định sẽ bị xóa</p>
        </div>
        -->
        <div class="comment-form">
            <div id="fb-root"></div>
            <script>(function(d, s, id) {
              var js, fjs = d.getElementsByTagName(s)[0];
              if (d.getElementById(id)) return;
              js = d.createElement(s); js.id = id;
              js.src = "//connect.facebook.net/vi_VN/all.js#xfbml=1";
              fjs.parentNode.insertBefore(js, fjs);
            }(document, 'script', 'facebook-jssdk'));</script>
            <div class="fb-comments" data-href="<?php echo $url;?>" data-num-posts="10"></div>
        </div>
    </div>
</div>

<?php }else{ ?>
<!-- TRANG TIN TUC -->
<!--<div id="sunnet_widget_44" style="display: block;padding:5px;clear:both;top:3px;">
    
    <script type="text/javascript">var is_load_sunnet_lib = is_load_sunnet_lib || 1;if(is_load_sunnet_lib == 1) {is_load_sunnet_lib = 2;if(typeof(jQuery)=='undefined') {document.write(unescape("%3Cscript src='http://amobi.vn/js/default/jquery-1.7.2.min.js' type='text/javascript'%3E%3C/script%3E"));}document.write(unescape("%3Cscript src='http://amobi.vn/js/default/sunnet.js' type='text/javascript'%3E%3C/script%3E"));}</script>
    <script type="text/javascript" src="http://amobi.vn/index/widget?widget_id=44"></script>    </center>    
        
</div>-->
<div class="box_top" style="clear:both;">
    <h2 class="label_top">Tin tức</h2>
    <ul id="list_news">
        <?php if($link['page'] == 1): foreach($this->list_nomination as $item):?>
        <li class="news_item">
                <a href="/app/tin-tuc/<?php echo $item['id'];?>-<?php echo $modelR->rewrite($item['title'])?>.html">
                <img src="<?php echo $item['thumb']?>" width="105px" height="105" alt="<?php echo $item['title_seo']?>"/>
                <span>
                    <h3><?php echo $item['title']?></h3>
                    <p class="date"><?php echo $item['date']?></p>
                    <div class="quote"><?php echo $item['description']?></div>
                </span>
                <div class="clear"></div> 
                </a>
         </li>
        <?php endforeach;endif;?>
        <!-- Tin tuc binh thuong -->
        <?php $paginationControl = $this->paginationControl($this->paginator, 'Sliding', '/app/paginator-news.phtml') ?>
         <?php if (count($this->paginator)) :
                foreach($this->paginator  as $item){
         ?>
         <li class="news_item">
                <a href="/app/tin-tuc/<?php echo $item['id'];?>-<?php echo $modelR->rewrite($item['title'])?>.html">
                <img src="<?php echo $item['thumb']?>" width="105px" height="105" alt="<?php echo $item['title_seo']?>"/>
                <span>
                    <h3><?php echo $item['title']?></h3>
                    <p class="date"><?php echo $item['date']?></p>
                    <div class="quote"><?php echo $item['description']?></div>
                </span>
                <div class="clear"></div> 
                </a>
         </li>
        <?php }?>   
        <?php endif;?>      
    </ul>
</div>
 <div class="pagi-control" >
        <?php echo $paginationControl; ?>
 </div>
<?php }?>